package com.itheima.system.dao;


import com.itheima.system.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.Map;

@Repository
public interface UserMapper extends Mapper<User> {

    @Select("select * from t_user where username = #{username}")
    User findByUserNameAndPssword(User user);



    @Insert("INSERT INTO t_user_role(userid,roleid) VALUES(#{userid},#{roleid})")
    void setUserAndRole(Map map);
}
